﻿using DevExpress.ExpressApp.DC;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Xpo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XafDeleteActionByConditionInListView.Module.BusinessObjects {
  [XafDisplayName("学生")]
  [DefaultClassOptions]
  public class TStudentBo : BaseObject {
    public TStudentBo(Session session) : base(session) { }


    private bool fDeleted;
    private int fAge;
    private string fName;

    [XafDisplayName("姓名")]
    public string Name {
      get => fName;
      set => SetPropertyValue(nameof(Name), ref fName, value);
    }


    [XafDisplayName("年龄")]
    public int Age {
      get => fAge;
      set => SetPropertyValue(nameof(Age), ref fAge, value);
    }


    [CaptionsForBoolValues("已删除", "未删除")]
    [XafDisplayName("是否删除")]
    public bool Deleted {
      get => fDeleted;
      set => SetPropertyValue(nameof(Deleted), ref fDeleted, value);
    }
  }
}
